package com.ehe.api.feign;

import com.ehe.api.feign.fallback.OauthManagerClientFallback;
import com.ehe.common.core.constant.AppConstant;
import org.springframework.cloud.openfeign.FeignClient;

@FeignClient(value = AppConstant.APPLICATION_AUTH_NAME, fallback = OauthManagerClientFallback.class)
public interface OauthManagerClient {

    /**
     * 获取 token
     * @param grantType 授权类型
     * @param username 用户名
     * @param password 密码
     * @param clientId 客户端编码
     * @param clientSecret 客户端密码
     * @param scope 授权范围
     * @return token
     */
//    @PostMapping("/oauth/token")
//    OAuth2AccessToken token(@RequestParam("grant_type") String grantType,
//                            @RequestParam("username") String username,
//                            @RequestParam("password") String password,
//                            @RequestParam("client_id") String clientId,
//                            @RequestParam("client_secret") String clientSecret,
//                            @RequestParam("scope") String scope);


}
